package com.shunbo.convenient.service.impl;

import com.shunbo.convenient.dao.CouponMapper;
import com.shunbo.convenient.service.CouponService;
import com.shunbo.convenient.vo.Coupon;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author weizhuang
 */

@Service
@Transactional
public class CouponServiceImpl implements CouponService {

    @Resource
    private CouponMapper couponMapper;

    @Override
    public Integer save(Coupon obj) {
        return couponMapper.save(obj);
    }

    @Override
    public Integer update(Coupon obj) {
        return couponMapper.update(obj);
    }

    @Override
    public Integer delete(String obj) {
        return couponMapper.delete(obj);
    }

    @Override
    public Coupon findById(String obj) {
        return couponMapper.findById(obj);
    }

    @Override
    public List<Coupon> findAll(Coupon obj) {
        return couponMapper.findAll(obj);
    }
}
